'use strict';

import { DataTypes } from 'sequelize'
import sequelize from '../utils/database.js'
import BaseModel from './BaseModel.js'

class SystemRolesUser extends BaseModel {
  /**
   * Helper method for defining associations.
   * This method is not a part of Sequelize lifecycle.
   * The `models/index` file will call this method automatically.
   */
  static associate(models) {
    // define association here
  }
}
SystemRolesUser.init({
  system_role_id: {
    allowNull: false,
    primaryKey: true,
    type: DataTypes.INTEGER,
    comment: '角色id'
  },
  user_id: {
    allowNull: false,
    primaryKey: true,
    type: DataTypes.INTEGER,
    comment: '管理员id'
  },
}, {
  sequelize,
  modelName: 'SystemRolesUser',
  tableName: 'system_roles_user'
})

export default SystemRolesUser
